package com.itheima.dao;

import com.itheima.pojo.Member;
import com.itheima.pojo.OrderSetting;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderSettingDao {
    //检查此数据（日期）是否存在
    long findCountByOrderDate(Date orderDate);

    //已经存在，执行更新操作
    void editNumberByOrderDate(OrderSetting orderSetting);

    //不存在，执行添加操作
    void add(OrderSetting orderSetting);
    //根据日期范围查询预约设置信息
    List<OrderSetting> getOrderSettingByMonth(Map date);
    //根据预约日期查询预约设置信息
    OrderSetting findByOrderDate(Date date);

    //更新已预约人数
    void editReservationsByOrderDate(OrderSetting orderSetting);
   //根据条件查询orderType，phoneNumber，name，orderStatus，id，orderDate
    List<Map> findByCondition(String queryString);
  //通过order id查找member
    Member findMemberByOrderId(Integer id);
    //将order的member_id设置为空
    void updateOrderMember_idIsNull(Integer id);
    //根据删除
    void deleteById(Integer id);
}
